Many Game Code Web sites contain codes for hacking games using the SoftICE debugger.  Many of these codes can be either converted to .HAK file hacks (see "Help\How To Create .HAK Files" menu item for details) or entered directly using GameHack.  Only those codes that use the "e" (edit) SoftICE command can be successfully used, and those that require searching and other advanced procedures will not work.

To convert a SoftICE code to a .HAK file hack, the only additional information you require is the original contents of the memory being "edited" (this is so GameHack is able to verify the hack will work with the currently running version of the game and to allow it to deactivate the hack).  The original memory contents can be obtained by selecting "Read Game Memory" from the "Utility" menu.  Enter the memory offset and length of the edit and GameHack will return the data that should be entered into the <olddata> field of the .HAK file hack.

As an example say you had the following SoftICE codes that you wanted to convert to a .HAK file hack (these are garbage codes BTW):

    E 405343 78 23 2 53 34 f
    E 48f2f2 23 90 23 0 0

The offset for each modification is the second (large) value and the newdata value is the stream of bytes following, which is represented in the .HAK file by converting all characters to two digit ('2' -> '02', 'f' -> '0f', etc.) and removing the spaces (or commas if they are written that way).  So you can enter the following into the .HAK file:

start V1.99 Some hack or other
405343 X 78230253340f
48f2f2 X 2390230000
end

The 'X' characters are just temporary place-holders and will be replaced in a second.  So you have the offsets and the newdata values, but GameHack also expects olddata values, which represents the current data in the program (again this is so GameHack can deactivate the hack by restoring the previous value, and also validate that the hack is compatible with the currently running version of the game).  You can get these values by asking GameHack to read them from the Game's process using the "Read Game Memory" command, so enter the offset and the number of bytes (in hex), which in our example are 6 for the first line and 5 for the second.  Suppose GameHack returned the values "652f85e903e1" and "8a0b872305" respectively, you can complete the .HAK file hack by inserting those values in place of the 'X' place-holder characters, thus:

start V1.99 Some hack or other
405343 652f85e903e1 78230253340f
48f2f2 8a0b872305 2390230000
end

All that remains is to load the .HAK file into GameHack and check that it works.

SoftICE codes can be entered directly using GameHack by selecting "Write Game Memory" from the "Utility" menu.  Enter the offset and the data and GameHack will write the data into the Game's process.  As with the data specifications in .HAK files, the data should be a hex stream, without delimiters, and must be a multiple of two. Be warned that this is an extremely dangerous thing to do, and can very easily (I mean VERY easily) result in the Game process crashing (not because of DirectX this time) and possibly the whole system.

Other things to note when using the Read/Write Game Memory commands are that all fields expect hex, so don't try to read 1000000 bytes from some offset, thinking that less than a meg of data should not be a problem as you will find that 1000000 (hex) = 16,777,216 (16 megs) the hard way.

Actually you're at no more risk from these command than you are from dodgy .HAK file values, so don't worry about them too much.
